package com.cloudptt.api.product.func.call;

public class CallConst 
{
	public static final int Operate_Suc                          = 0;
	
	public static final int CallId_Default                      = 0;
	
	public static final int CallState_Begin                     = 0;
	public static final int CallState_InitState                 = CallState_Begin + 1;
	public static final int CallState_ConnectingState           = CallState_Begin + 2;
	public static final int CallState_Activite                  = CallState_Begin + 3;
	public static final int CallState_DisconnectingState        = CallState_Begin + 4;
	
	public static final int FloorState_Begin                    = 10;
	public static final int FloorState_Null                     = FloorState_Begin + 1;
	public static final int FloorState_NoPermission             = FloorState_Begin + 2;
	public static final int FloorState_PendingRequset           = FloorState_Begin + 3;
	public static final int FloorState_Permission               = FloorState_Begin + 4;
	public static final int SpeakState_PendingRelease           = FloorState_Begin + 5;
//	public static final int SpeakState_Listen                   = SpeakState_Begin + 6;
	
		
	public static final int VideoState_Begin                    = 20;
	public static final int VideoState_NoPermission             = VideoState_Begin + 1;
	public static final int VideoState_PendingRequest           = VideoState_Begin + 2;
//	public static final int VideoState_Show                     = VideoState_Begin + 3;
	public static final int VideoState_PendingRelease           = VideoState_Begin + 4;
	public static final int VideoState_Permission               = VideoState_Begin + 5;
	
	public static final int BtnId_Begin                         = 50;
//	public static final int BtnId_Talk_Down                     = BtnId_Begin + 1;
//	public static final int BtnId_Talk_Up                       = BtnId_Begin + 2;
//	public static final int BtnId_Exit                          = BtnId_Begin + 3;
	
	public static final int ErrId_Begin                         = 80;
	public static final int ErrId_DestoryCall                 = BtnId_Begin + 1;
//	public static final int ErrId_TimeOut                       = BtnId_Begin + 2;
	public static final int ErrId_SetHold                       = BtnId_Begin + 3;
	
	public static final int BtnAction_Begin                     = 100;
//	public static final int BtnAction_Down                      = BtnAction_Begin + 1;
//	public static final int BtnAction_Up                        = BtnAction_Begin + 2;
	public static final int BtnAction_Make                      = BtnAction_Begin + 0;
	public static final int BtnAction_Make_Video                = BtnAction_Begin + 1;
	public static final int BtnAction_Hangup                    = BtnAction_Begin + 2;
	public static final int BtnAction_Accept                    = BtnAction_Begin + 3;
	public static final int BtnAction_Exit                      = BtnAction_Begin + 5;
	public static final int BtnAction_Request                   = BtnAction_Begin + 6;
	public static final int BtnAction_Release                   = BtnAction_Begin + 7;
	public static final int BtnAction_SwitchCamera              = BtnAction_Begin + 8;
	public static final int BtnAction_MicMute                   = BtnAction_Begin + 9;
	public static final int BtnAction_StartVideoSource          = BtnAction_Begin + 10;
	public static final int BtnAction_StopVideoSource           = BtnAction_Begin + 11;
	public static final int BtnAction_Minimize                  = BtnAction_Begin + 12;
	public static final int BtnAction_PlayWavFile               = BtnAction_Begin + 13;
	public static final int BtnAction_Subscribe                 = BtnAction_Begin + 14;
	public static final int BtnAction_Vol_Up                    = BtnAction_Begin + 15;
	public static final int BtnAction_Vol_Down                  = BtnAction_Begin + 16;
	
//	public static final int SysAction_NetworkOfflin             = BtnAction_Begin + 4;
	
	public static final int Session_Begin                    = 200;
//	public static final int CallState_Connecting_Calling       = CallState_Begin + 1;//主叫连接成功
	public static final int Session_Connecting        = Session_Begin + 2;//被叫连接成功
	public static final int Session_Disconnected             = Session_Begin + 3;
	public static final int Session_Confirmed_Active         = Session_Begin + 4;
	public static final int Session_Confirmed_Hold           = Session_Begin + 5;
	public static final int Session_Confirmed_LateJoinNoFloor= Session_Begin + 6;
	public static final int Session_MediaErr               = Session_Begin + 7;
//	ublic static final int Session_Confirmed_Active         = Session_Begin + 8;
//	public static final int Session_Confirmed_Active_Floor         = Session_Begin + 8;
//	public static final int Session_Confirmed_Active_Video         = Session_Begin + 9;
	
//	public static final int CallState_Calling                  = CallState_Begin + 7;//来电
	
	public static final int Info_Begin                         = 300;
	public static final int Info_Listen                		   = Info_Begin + 1;
	public static final int Info_Speaking                      = Info_Begin + 2;
	public static final int Info_TalkEnd                       = Info_Begin + 3;
	public static final int Info_Show_Start                	   = Info_Begin + 4;
	public static final int Info_Show_Stop                     = Info_Begin + 5;
	public static final int Info_Err                           = Info_Begin + 6;
	
//	public static final int Timer_Idle = 35;//话权空闲释放定时器
//	public static final int Timer_Talk = 35;//话权占用释放定时器
//	public static final int Timer_Listen = 35;//话权停释放定时器
	public static final int Timer_Long = 10;
//	public static final int Timer_Short = 5;
	public static final int Timer_None = 0;
	
	public static final int Timer_Video_Show = 24*60*60;
	
	public final static String Speak_Log = "speak";
	
	public static final int SurfaceView_Type_Local = 1;
	public static final int SurfaceView_Type_Remote = 2;
	
	
	public static String userActionTag(int action){
		String tag="unknown " + action;
		switch (action) {
		case BtnAction_Make:
			tag = "BtnAction_Make";
			break;
		case BtnAction_Hangup:
			tag = "BtnAction_Hangup";
			break;
		case BtnAction_Accept:
			tag = "BtnAction_Accept";
			break;
		case BtnAction_Exit:
			tag = "BtnAction_Exit";
			break;
		case BtnAction_Request:
			tag = "BtnAction_Request";
			break;
		case BtnAction_Release:
			tag = "BtnAction_Release";
			break;
			
		case BtnAction_SwitchCamera:
			tag = "BtnAction_SwitchCamera";
			break;
		case BtnAction_MicMute:
			tag = "BtnAction_MicMute";
			break;
		case BtnAction_StartVideoSource:
			tag = "BtnAction_StartVideoSource";
			break;
		case BtnAction_StopVideoSource:
			tag = "BtnAction_StopVideoSource";
			break;
		default:
			break;
		}
		return tag;
	}

	public static String sessionTag(int action){
		String tag="unknown";
		switch (action)
		{
		case Session_Connecting:
			tag = "Session_Connecting";
		break;
		case Session_Disconnected:
			tag = "Session_Disconnected";
			break;
		case Session_Confirmed_Active:
			tag = "Session_Confirmed_Active";
			break;
		case Session_MediaErr:
			tag = "Session_MediaErr";
			break;
		default:
			break;
		}
		return tag;
	}
	public static String infoTag(int type) {
		String tag="unknown";
		switch (type)
		{
		case Info_Listen:
			tag = "Info_Listen";
		break;
		case Info_Speaking:
			tag = "Info_Speaking";
			break;
		case Info_TalkEnd:
			tag = "Info_TalkEnd/";
			break;
		case Info_Show_Start:
			tag = "Info_Show_Start";
			break;
		case Info_Show_Stop:
			tag = "Info_Show_Stop";
			break;
		case Info_Err:
			tag = "Info_Err";
		break;
		default:
			break;
		}
		return tag;
	}
	
	public static String stateTag(int type) {
		String tag="unknown";
		switch (type)
		{
		case CallState_Begin:
			tag = "CallState_Begin";
		break;
		case CallState_InitState:
			tag = "CallState_InitState";
		break;
		case CallState_ConnectingState:
			tag = "CallState_ConnectingState";
			break;
		case CallState_Activite:
			tag = "CallState_Activite";
			break;
		case CallState_DisconnectingState:
			tag = "CallState_DisconnectingState";
			break;
		
		
		case FloorState_Begin:
			tag = "SpeakState_Begin";
		break;
		case FloorState_NoPermission:
			tag = "FloorNoPermissionState";
		break;
		case FloorState_PendingRequset:
			tag = "FloorPendingRequestState";
			break;
		case FloorState_Permission:
			tag = "FloorPermissionState";
			break;
		case SpeakState_PendingRelease:
			tag = "FloorPendingReleaseState";
			break;
			
		case VideoState_Begin:
			tag = "VideoState_Begin";
		break;
		case VideoState_NoPermission:
			tag = "VideoNoPermissionState";
		break;
		case VideoState_PendingRequest:
			tag = "VideoPendingRequestState";
		break;
		case VideoState_PendingRelease:
			tag = "VideoPendingReleaseState";
		break;
		case VideoState_Permission:
			tag = "VideoPermissionState";
		break;
		default:
			break;
		}
		return tag;
	}
}
